#include "priority_queue.h"
using namespace hql;
void test()
{
	priority_queue<int,vector<int>,Greater<int>> pq;
	pq.push(1);
	pq.push(97);
	pq.push(27);
	pq.push(43);
	pq.push(32);

	while (!pq.empty()) {
		cout << pq.top() << " ";
		pq.pop();
	}
	
}

void test1()
{
	priority_queue<Date, vector<Date>, Less<Date>> pq;
	
	/*pq.push(1);
	pq.push(97);
	pq.push(27);
	pq.push(43);
	pq.push(32);*/
	pq.push(Date(2022, 6, 1));
	pq.push(Date(2021, 12, 1));
	pq.push(Date(2023, 7, 1));
	pq.push(Date(2024, 9, 1));
	pq.push(Date(2020, 10, 1));


	while (!pq.empty()) {
		cout << pq.top() << endl;
		pq.pop();
	}

}

void test2()
{
	priority_queue<Date*, vector<Date*>, GreaterPDate> pq;

	/*pq.push(1);
	pq.push(97);
	pq.push(27);
	pq.push(43);
	pq.push(32);*/
	pq.push(new Date(2022, 6, 1));
	pq.push(new Date(2021, 12, 1));
	pq.push(new Date(2023, 7, 1));
	pq.push(new Date(2024, 9, 1));
	pq.push(new Date(2020, 10, 1));


	while (!pq.empty()) {
		cout << *pq.top() << endl;
		pq.pop();
	}

}
int main()
{
	test2();
	return 0;
}